package huriezy.quickcontacts.activities.fragments;

import huriezy.quickcontacts.activities.interfaces.IContactFragment;
import huriezy.quickcontacts.models.LogDebug;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public abstract class ContactFragment extends Fragment implements IContactFragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View result = super.onCreateView(inflater, container, savedInstanceState);
		LogDebug.debug("onCreateView for " + getClass().getSimpleName(), getClass());
		return result;
	}

	@Override
	public void onDestroyView() {
		super.onDestroyView();
		LogDebug.debug("onDestroyView for " + getClass().getSimpleName(), getClass());
	}

	@Override
	public void onStart() {
		super.onStart();
		LogDebug.debug("onStart for " + getClass().getSimpleName(), getClass());
	}
	
	@Override
	public void onStop() {
		super.onStop();
		LogDebug.debug("onStop for " + getClass().getSimpleName(), getClass());
	}
	
	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);
		LogDebug.debug("onAttach for " + getClass().getSimpleName(), getClass());
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		LogDebug.debug("onActivityCreated for " + getClass().getSimpleName(), getClass());
	}
	
	@Override
	public void updateData() {
		// Does nothing by default.
		// Must be override if some data must be loaded at fragment selection
	}
}
